﻿namespace NyírásAdat
{
    using System;
    using System.Configuration;

    public static class DB
    {
        public static DynamicModel Current
        {
            get
            {
                if (ConfigurationManager.ConnectionStrings.Count > 1)
                {
                    return new DynamicModel(ConfigurationManager.ConnectionStrings[1].Name);
                }
                throw new InvalidOperationException("Config Error: No valid connection string name.");
            }
        }
    }
}